package com.uy.cuantoconocesdeuruguay.utiles;

import android.app.Activity;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class ConnectionManager {
	public static boolean isNetworkConnected(Activity activity) {
		 ConnectivityManager connMgr = (ConnectivityManager) activity.getSystemService(Context.CONNECTIVITY_SERVICE);
		 NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
		 if (networkInfo != null && networkInfo.isConnected()) {
			 return true;
		 } else {
			 return false;
		 }
	 }
}
